<%-- 
    Document   : index
    Created on : 11.02.2013, 22:42:42
    Author     : Jarik
--%>
<%@page import="com.bionic.CES.beans.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
          <form name="UpdateForm" method="POST" action="Controller">
            <input type="hidden" name="command" value ="updateCurrentUser"/>
            Hello <%= ((User)session.getAttribute("user")) %>
            Login <%= request.getAttribute("login") %>
            <table>
                    <tr>
                    <input type="hidden" name="userId" value ="<%= ((User)session.getAttribute("user")).getUserid() %>"/>
                    </tr>
                    <tr>
                        <td>Name</td>
                        <td><input type="text" name="Name" value="<%= ((User)session.getAttribute("user")).getName() %>"/></td>
                    </tr>
                    <tr>
                        <td>Surname</td>
                        <td><input type="text" name="Surname" value="${sessionScope.user.surName}"/></td>
                    </tr>
                    <tr>
                        <td>email</td>
                        <td><input type="text" name="email" value="${sessionScope.user.email}"/></td>
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td><input type="text" name="Password" value="${sessionScope.user.password}"/></td>
                    </tr>
                    <tr>
                        <td>Adress</td>
                        <td><input type="text" name="Adress" value="${sessionScope.user.adress}"/></td>
                    </tr> 
                    <tr>
                        <td>Telephone</td>
                        <td><input type="text" name="Telephone" value="${sessionScope.user.telephone}"/></td>
                    </tr>

                </table>
                <br/>
                <input type="submit" value="submit"/>
                <hr/>
                <!--                <a href="jsp/main.jspx">Return to login page</a>-->
                <form name="UpdateForm" method="POST" action="Controller">
                    <input type="hidden" name="command" value ="login"/>
                    <br/>
                    <input type="submit" value="Go to Login Page"/>
                </form>
            </form>
        </body>

</html>